﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace com.his.mediaFileOrganizer
{
    class Program
    {
        static void Main(string[] args)
        {        
            
            try
            {
                String source = ConfigurationManager.AppSettings["srcDir"];
                String target = ConfigurationManager.AppSettings["tgtDir"];
                if (source == target)
                    throw new OperationCanceledException("Operation not allowed, Source and Target cannot be the same");

                FileAnalyzer fa = new FileAnalyzer(target);
                fa.Analyze(source);

                Console.WriteLine("Completed");
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
                 
        }
    }
}
